/**
 * 
 */
package com.alianzamedica.controllers.prescription;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.objectsearch.web.tools.Converter;

import com.alianzamedica.businessobject.Doctor;
import com.alianzamedica.models.DrugSelectModel;

/**
 * @author RMarquez_Inf
 * 
 */
public class PrescriptionHelper {
	/**
	 * muestra los medicamentos.
	 * 
	 * @param request
	 *            request de la bd
	 * @param response
	 *            respuesta de la bd.
	 * @return medicamentos.
	 * @throws Exception
	 *             si ocurre error.
	 */
	@SuppressWarnings("unchecked")
	public List showDrugs(int doctorId, String busqueda) throws Exception {
		DrugSelectModel dm = new DrugSelectModel();
		ArrayList list =null;
		if (busqueda == null) {
			list= dm.getProducts(doctorId);
		}else{
			list = dm.getProducts(doctorId,busqueda);
		}
		return list;
	}
}
